/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.icode.main;

import com.icode.rmi.IModules;
import com.icode.rmi.ITouristAttractions;
import com.icode.rmi.ModuleDAO;
import com.icode.rmi.TouristAttractionDAO;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 *
 * @author Hot_Girls
 */
public class ServerMain {
    public static void main(String[] args) throws RemoteException{
        Registry reg = LocateRegistry.createRegistry(2012);
        
        ITouristAttractions ita = new TouristAttractionDAO();
        reg.rebind("touristAttractions", ita);
        
        IModules imd = new ModuleDAO();
        reg.rebind("modules", imd);
        
        System.out.println("Server is running....");
    }
}
